﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;



namespace Comp476Project
{
    public enum AIState
    {
        NONE,
        SFLEE,
        PATH,
        ATTACK
       
    };

    class NPC: Entity
    {

       
       
        public float speed, maxSpeed, damageGiven;
        public Vector3 velocity;
        public AIState behaviour;
        //public Entity target;
        public int priority;
        public float maxValue = 0.90f;
        Primitives3D.SpherePrimitive sphere;
        public NPC(Primitives3D.SpherePrimitive sphere,Matrix proj, Model mod, Vector3 pos)
            : base( sphere,proj, mod,pos)
        {
            position = pos;
            speed = 0;
            attackRange = 0;
            viewRange = 0;
            speed = 0.0f;
            velocity = direction * speed;

            maxSpeed = 0.0f;
            behaviour = AIState.NONE;
            priority = 0;
            this.sphere = sphere;
        }

        
        
       
        public override void update(GameTime gameTime)
        {




            boundary();
            base.update(gameTime);
        }

        public override void draw(Matrix view) 
        {


            base.draw(view);
        }



        

        public void boundary()
        {
            if (position.X > maxValue)
            {
                position.X = maxValue;
            }
            if (position.X < -maxValue)
            {
                position.X = -maxValue;
            }

            if (position.Z > maxValue)
            {
                position.Z = maxValue;
            }
            if (position.Z < -maxValue)
            {
                position.Z = -maxValue;
            }
        }//end of boundary

       
        
    }
}
